Optimal. Leaf size=816 \[ \frac {2 \left (b^2-2 a c+b c x\right )}{a \left (b^2-4 a c\right ) d \sqrt {a+b x+c x^2}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (2 c^2 d+b^2 f-c (b e+2 a f)\right )+c \left (2 c^2 d e+b f (b e-a f)-b c \left (e^2+d f\right )\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {a+b x+c x^2}}-\frac {\tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{a^{3/2} d}+\frac {f \left (\left (e-\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )-2 \left (f \left (b e^2-b d f-a e f\right )-c \left (e^3-2 d e f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e-\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e-\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-2 c d f-b e f+2 a f^2-(c e-b f) \sqrt {e^2-4 d f}} \sqrt {a+b x+c x^2}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-2 c d f-b e f+2 a f^2-(c e-b f) \sqrt {e^2-4 d f}}}-\frac {f \left (\left (e+\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )-2 \left (f \left (b e^2-b d f-a e f\right )-c \left (e^3-2 d e f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e+\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e+\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-2 c d f-b e f+2 a f^2+(c e-b f) \sqrt {e^2-4 d f}} \sqrt {a+b x+c x^2}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-2 c d f-b e f+2 a f^2+(c e-b f) \sqrt {e^2-4 d f}}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 14.81, antiderivative size = 814, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {6860, 754, 12,
738, 212, 1030, 1046} \begin {gather*} \frac {2 \left (b^2+c x b-2 a c\right )}{a \left (b^2-4 a c\right ) d \sqrt {c x^2+b x+a}}-\frac {\tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {c x^2+b x+a}}\right )}{a^{3/2} d}-\frac {f \left (2 f \left (b e^2-a f e-b d f\right )-2 c \left (e^3-2 d e f\right )-\left (e-\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e-\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e-\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-b f e+2 a f^2-2 c d f-(c e-b f) \sqrt {e^2-4 d f}} \sqrt {c x^2+b x+a}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-b f e+2 a f^2-2 c d f-(c e-b f) \sqrt {e^2-4 d f}}}+\frac {f \left (2 f \left (b e^2-a f e-b d f\right )-2 c \left (e^3-2 d e f\right )-\left (e+\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e+\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e+\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-b f e+2 a f^2-2 c d f+(c e-b f) \sqrt {e^2-4 d f}} \sqrt {c x^2+b x+a}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-b f e+2 a f^2-2 c d f+(c e-b f) \sqrt {e^2-4 d f}}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (f b^2+2 c^2 d-c (b e+2 a f)\right )+c \left (2 d e c^2-b \left (e^2+d f\right ) c+b f (b e-a f)\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c x^2+b x+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 738
Rule 754
Rule 1030
Rule 1046
Rule 6860
Rubi steps
\begin {align*} \int \frac {1}{x \left (a+b x+c x^2\right )^{3/2} \left (d+e x+f x^2\right )} \, dx &=\int \left (\frac {1}{d x \left (a+b x+c x^2\right )^{3/2}}+\frac {-e-f x}{d \left (a+b x+c x^2\right )^{3/2} \left (d+e x+f x^2\right )}\right ) \, dx\\ &=\frac {\int \frac {1}{x \left (a+b x+c x^2\right )^{3/2}} \, dx}{d}+\frac {\int \frac {-e-f x}{\left (a+b x+c x^2\right )^{3/2} \left (d+e x+f x^2\right )} \, dx}{d}\\ &=\frac {2 \left (b^2-2 a c+b c x\right )}{a \left (b^2-4 a c\right ) d \sqrt {a+b x+c x^2}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (2 c^2 d+b^2 f-c (b e+2 a f)\right )+c \left (2 c^2 d e+b f (b e-a f)-b c \left (e^2+d f\right )\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int \frac {-\frac {b^2}{2}+2 a c}{x \sqrt {a+b x+c x^2}} \, dx}{a \left (b^2-4 a c\right ) d}-\frac {2 \int \frac {-\frac {1}{2} \left (b^2-4 a c\right ) \left (f \left (b e^2-b d f-a e f\right )-c \left (e^3-2 d e f\right )\right )+\frac {1}{2} \left (b^2-4 a c\right ) f \left (c e^2-c d f-b e f+a f^2\right ) x}{\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )} \, dx}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\\ &=\frac {2 \left (b^2-2 a c+b c x\right )}{a \left (b^2-4 a c\right ) d \sqrt {a+b x+c x^2}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (2 c^2 d+b^2 f-c (b e+2 a f)\right )+c \left (2 c^2 d e+b f (b e-a f)-b c \left (e^2+d f\right )\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {a+b x+c x^2}}+\frac {\int \frac {1}{x \sqrt {a+b x+c x^2}} \, dx}{a d}+\frac {\left (f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e-\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right )\right ) \int \frac {1}{\left (e-\sqrt {e^2-4 d f}+2 f x\right ) \sqrt {a+b x+c x^2}} \, dx}{d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}-\frac {\left (f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e+\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right )\right ) \int \frac {1}{\left (e+\sqrt {e^2-4 d f}+2 f x\right ) \sqrt {a+b x+c x^2}} \, dx}{d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\\ &=\frac {2 \left (b^2-2 a c+b c x\right )}{a \left (b^2-4 a c\right ) d \sqrt {a+b x+c x^2}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (2 c^2 d+b^2 f-c (b e+2 a f)\right )+c \left (2 c^2 d e+b f (b e-a f)-b c \left (e^2+d f\right )\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {a+b x+c x^2}}-\frac {2 \text {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {2 a+b x}{\sqrt {a+b x+c x^2}}\right )}{a d}-\frac {\left (2 f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e-\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right )\right ) \text {Subst}\left (\int \frac {1}{16 a f^2-8 b f \left (e-\sqrt {e^2-4 d f}\right )+4 c \left (e-\sqrt {e^2-4 d f}\right )^2-x^2} \, dx,x,\frac {4 a f-b \left (e-\sqrt {e^2-4 d f}\right )-\left (-2 b f+2 c \left (e-\sqrt {e^2-4 d f}\right )\right ) x}{\sqrt {a+b x+c x^2}}\right )}{d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}+\frac {\left (2 f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e+\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right )\right ) \text {Subst}\left (\int \frac {1}{16 a f^2-8 b f \left (e+\sqrt {e^2-4 d f}\right )+4 c \left (e+\sqrt {e^2-4 d f}\right )^2-x^2} \, dx,x,\frac {4 a f-b \left (e+\sqrt {e^2-4 d f}\right )-\left (-2 b f+2 c \left (e+\sqrt {e^2-4 d f}\right )\right ) x}{\sqrt {a+b x+c x^2}}\right )}{d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right )}\\ &=\frac {2 \left (b^2-2 a c+b c x\right )}{a \left (b^2-4 a c\right ) d \sqrt {a+b x+c x^2}}+\frac {2 \left (c e (2 a c e-b (c d+a f))+(b e-a f) \left (2 c^2 d+b^2 f-c (b e+2 a f)\right )+c \left (2 c^2 d e+b f (b e-a f)-b c \left (e^2+d f\right )\right ) x\right )}{\left (b^2-4 a c\right ) d \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {a+b x+c x^2}}-\frac {\tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{a^{3/2} d}-\frac {f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e-\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e-\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e-\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-2 c d f-b e f+2 a f^2-(c e-b f) \sqrt {e^2-4 d f}} \sqrt {a+b x+c x^2}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-2 c d f-b e f+2 a f^2-(c e-b f) \sqrt {e^2-4 d f}}}+\frac {f \left (2 f \left (b e^2-b d f-a e f\right )-2 c \left (e^3-2 d e f\right )-\left (e+\sqrt {e^2-4 d f}\right ) \left (f (b e-a f)-c \left (e^2-d f\right )\right )\right ) \tanh ^{-1}\left (\frac {4 a f-b \left (e+\sqrt {e^2-4 d f}\right )+2 \left (b f-c \left (e+\sqrt {e^2-4 d f}\right )\right ) x}{2 \sqrt {2} \sqrt {c e^2-2 c d f-b e f+2 a f^2+(c e-b f) \sqrt {e^2-4 d f}} \sqrt {a+b x+c x^2}}\right )}{\sqrt {2} d \sqrt {e^2-4 d f} \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \sqrt {c e^2-2 c d f-b e f+2 a f^2+(c e-b f) \sqrt {e^2-4 d f}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 4.65, size = 1025, normalized size = 1.26 \begin {gather*} -\frac {2 \left (b^4 f+2 a c^2 (-c d+a f+c e x)+b^3 c (-e+f x)+b^2 c (-4 a f+c (d-e x))+b c^2 (c d x+3 a (e-f x))\right )}{a \left (-b^2+4 a c\right ) \left (c^2 d^2-b c d e+f \left (b^2 d-a b e+a^2 f\right )+a c \left (e^2-2 d f\right )\right ) \sqrt {a+x (b+c x)}}+\frac {2 \tanh ^{-1}\left (\frac {\sqrt {c} x-\sqrt {a+x (b+c x)}}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\text {RootSum}\left [b^2 d-a b e+a^2 f-4 b \sqrt {c} d \text {$\#$1}+2 a \sqrt {c} e \text {$\#$1}+4 c d \text {$\#$1}^2+b e \text {$\#$1}^2-2 a f \text {$\#$1}^2-2 \sqrt {c} e \text {$\#$1}^3+f \text {$\#$1}^4\&,\frac {-b c e^3 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )+2 b c d e f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )+b^2 e^2 f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )+a c e^2 f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )-b^2 d f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )-a c d f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )-2 a b e f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )+a^2 f^3 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )+2 c^{3/2} e^3 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}-4 c^{3/2} d e f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}-2 b \sqrt {c} e^2 f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}+2 b \sqrt {c} d f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}+2 a \sqrt {c} e f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}-c e^2 f \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}^2+c d f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}^2+b e f^2 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}^2-a f^3 \log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{2 b \sqrt {c} d-a \sqrt {c} e-4 c d \text {$\#$1}-b e \text {$\#$1}+2 a f \text {$\#$1}+3 \sqrt {c} e \text {$\#$1}^2-2 f \text {$\#$1}^3}\&\right ]}{d \left (c^2 d^2-b c d e+f \left (b^2 d-a b e+a^2 f\right )+a c \left (e^2-2 d f\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2058\) vs.
\(2(753)=1506\).
time = 0.17, size = 2059, normalized size = 2.52
method | result | size |
default | \(\text {Expression too large to display}\) | \(2059\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x \left (a + b x + c x^{2}\right )^{\frac {3}{2}} \left (d + e x + f x^{2}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{x\,{\left (c\,x^2+b\,x+a\right )}^{3/2}\,\left (f\,x^2+e\,x+d\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________